/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * leafget
 * Copyright (C) xinliGG 2008 <xinliGG@gmail.com>
 * 
 * leafget is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * leafget is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _PREFERENCES_H_
#define _PREFERENCES_H_

#include <string>

#include "modelc.h"
#include "leafget.h"
 
class Preferences: public Gtk::Dialog 
{
public:

	Preferences ( Gtk::Window &, LEAF_CONFIG_DATA & );
	virtual ~Preferences ( void ) { };
	
		/* get functions */

	const std::string get_dir         ( void ) const;	
	const int         get_tasksLimit  ( void ) const;
	const int         get_speedLimit  ( void ) const;
	const std::string get_pass        ( void ) const;
	const bool        get_start       ( void ) const;
	
private:
 
 		/* events */
 
	virtual void on_button_folder_preferences ( void );
	virtual void on_combo_changed             ( void );

		/* config */

	int tasksLimit;

		/* widgets */

	Gtk::VBox *preferencesBox;
	Gtk::VBox  boxTasks;

	Gtk::HBox  boxPath;
	Gtk::HBox  boxTasksLimit;
	Gtk::HBox  boxSpeedLimit;
	Gtk::HBox  boxPass;
	Gtk::HBox  boxRadio;

	Gtk::Frame FrameTasks;
	Gtk::Frame FrameConnection;
	Gtk::Frame FrameFTP;
	Gtk::Frame FrameStartOptions;
	
	Gtk::Label LabelPath;
	Gtk::Label LabelTasksLimit;
	Gtk::Label LabelSpeedLimit;
	Gtk::Label LabelPass;

	Gtk::Button Button_Folder;	

	Model_c                   Columns_C;
	Gtk::ComboBox                Combo;
	Glib::RefPtr<Gtk::ListStore> refTreeModel_C;

	Gtk::Entry EntryPath;
	Gtk::Entry EntrySpeedLimit;
	Gtk::Entry EntryPass;

	Gtk::RadioButton        RadioButtonOn;
	Gtk::RadioButton        RadioButtonOff;
	Gtk::RadioButton::Group group;

	Gtk::Alignment          AlignmentRadio;
};

#endif // _PREFERENCES_H_
